package com.icehand.disruptor.starter.annotation;

import com.icehand.disruptor.starter.config.DisruptorConfiguration;
import com.icehand.disruptor.starter.config.DisruptorProperties;
import com.icehand.disruptor.starter.config.RingBufferConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 *
 * @author zhoujunmei
 * @date 2019-07-24 11:27
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Import({DisruptorConfiguration.class, RingBufferConfiguration.class})
@ConditionalOnProperty(prefix = DisruptorProperties.PREFIX, value = "enabled", havingValue = "true")
public @interface EnableIcehandDisruptor {
}
